// 启动方法: 安装好nodejs后
//   npm install
//   node src/main/js/grpcClient.js

var PROTO_FILE_PATH = 'src/main/protoBuf/Student.proto'
var rpc = require('grpc');
var grpcService = rpc.load(PROTO_FILE_PATH).com.shengsiyuan.proto;

var client = new grpcService.StudentService('localhost:8899', rpc.credentials.createInsecure());

client.getRealNameByUsername({username: 'lisi'}, function (error, respData) {
    console.log(respData);
});